$(function(){
	if(localStorage.getItem("$detail")){
		var goodsItem = JSON.parse(localStorage.getItem("$detail"));
		// $("#slider").children("div").eq(0)
		// 	.children("div").eq(0).children("a")
		// 	.children("img").attr("src",goodsItem.imgSrc);
		$("#slider").children("div").eq(0)
			.children("div").eq(1).children("a")
			.children("img").attr("src",goodsItem.images[0]);
		$(".deails-con").children("li").eq(0).text(goodsItem.title);
		$(".deails-con").children("li").eq(1).children("span").eq(0).text("￥"+goodsItem.price);
		$(".deails-con").children("li").eq(1).children("span").eq(1).children("label").text(goodsItem.stock);
		$('.deails-con-text__li').text(goodsItem.detail)
		// console.log(goodsItem)
		$('.spec-menu').append(`
			<div class="spec-menu-content spec-menu-show" style="display: block;">
				<div class="spec-menu-top bdr-b">
					<div class="spec-first-pic"> <img id="spec_image" src="${goodsItem.images[0]}" /> </div>
					<a class="rt-close-btn-wrap spec-menu-close">
						<p class="flick-menu-close tclck"> <img src="../images/close.png" width="24" height="24" /> </p>
					</a>
					<div class="spec-price" id="specJdPri" style="display: block"> <span class="yang-pic spec-yang-pic"> </span> <span id="spec_price">${goodsItem.price} </span> </div>
					<div id="specWeightDiv" class="spec-weight"> <span>重量:</span> <span id="spec_weight">0.56kg</span> </div>
				</div>

				<div class="nature-container" id="natureCotainer">
					<div class="pro-color"> <span class="part-note-msg">${goodsItem.color}</span>
						<p id="color">
							<a title="白色 直袖款" class="a-item selected J_ping" report-eventparam="默认">暂无其他颜色</a>
						</p>
					</div>
				</div>
				<button id="toShopCar" class="true-button tclck">确定</button>
			</div>
		`)
	}
});
